function GetSys_Log() {

	var myData = [
			['1', '2011-11-01 12:00:00', "admin", "系统", "登录系统"],
			['2', '2011-11-01 12:00:00', "admin", "系统", "登录系统"],
			['3', '2011-11-01 12:00:00', "admin", "系统", "登录系统"],
			['4', '2011-11-01 12:00:00', "admin", "系统", "登录系统"],
			['5', '2011-11-01 12:00:00', "admin", "系统", "登录系统"]

	];


	var store = new Ext.data.ArrayStore({
				fields : [{
							name : 'id'
						}, {
							name : 'time'
						}, {
							name : 'name'
						}, {
							name : 'module'
						}, {
							name : 'context'
						}]
			});
			
	store.loadData(myData);
	var nowpage = new Ext.Toolbar.TextItem('1');
	var countpage = new Ext.Toolbar.TextItem('共1页');
	var now_page = 0;
	var count_page = 0;
	var sm = new Ext.grid.CheckboxSelectionModel();
	var grid = new Ext.grid.GridPanel({
				store : store,
				columns : [sm, {
							id : 'id',
							header : 'id',
							width : 10,
							sortable : true,
							dataIndex : 'id',
							hidden : true
						}, {
							header : '时间',
							width : 150,
							sortable : true,
							dataIndex : 'time'
						}, {
							header : '名称',
							width : 70,
							sortable : true,
							dataIndex : 'name'
						}, {
							header : '模块',
							width : 70,
							sortable : true,
							dataIndex : 'module'
						}, {
							header : '内容',
							width : 70,
							sortable : true,
							dataIndex : 'context'
						}],
				sm : sm,
				tbar : [
				
						{
							text : '删除',
							tooltip : '删除',
							iconCls : 'delete',
							ref : '../removeBtn',
							disabled : true,
							handler : function() {
								var s = grid.getSelectionModel().getSelections();
								for (var i = 0; r = s[i]; i++) {
									store.remove(r);
								}
							}
						}, '-', {
							text : '查找',
							tooltip : '查找',
							iconCls : 'search',
							handler : function() {							
								SyslogSearchWindows(searchReturn);
							}
						}],
				bbar : [{
					tooltip : '首页',
					handler : function() {
						reflashgriad(0);
					},
					iconCls : 'frist'
				}, {

					tooltip : '上一页',
					handler : function() {
						reflashgriad(now_page - 1);
					},
					iconCls : 'perv'
				}, nowpage, {

					tooltip : '下一页',
					handler : function() {
						reflashgriad(now_page + 1);
					},
					iconCls : 'next'
				}, {

					tooltip : '最后一页',
					handler : function() {
						reflashgriad(Math.ceil(count_page / 20) - 1);
					},
					iconCls : 'last'
				}, {
					xtype : "tbfill"
				}, countpage],
				stripeRows : true,
				autoExpandColumn : 'id',
				stateful : true,
				stateId : 'sysloggrid'
			});
	grid.getSelectionModel().on('selectionchange', function(sm) {
				grid.removeBtn.setDisabled(sm.getCount() < 1);
			});

	function searchReturn(data){
		var jsondata = Ext.util.JSON.decode(data);
		
	}

	function reflashgriad(page) {
	}
	
	
	
	return grid;
}
function SyslogSearchWindows(searchReturn){
		var Search = new Ext.form.FormPanel({
				frame : true,
				layout : 'form',
				region : 'center',
				xtype : 'fieldset',
				bodyStyle : 'padding:10px;',
				items : [{
							xtype : 'checkboxgroup',
							fieldLabel : '起始时间',
							name : 'start',
							id : 'start',
							columns : 2,
							vertical : true,
							items : [{
										xtype : 'datefield',
										name : 'startdate',
										id   : 'startdate',
										format: 'Y-m-d',
										value:'${startdate}'
									}, {
										xtype : 'timefield',
										name : 'starttime',
										id   : 'starttime',
										value:'00:00',
										format: 'H:i'
	
									}]
						},{
							xtype : 'checkboxgroup',
							fieldLabel : '结束时间',
							name : 'end',
							id : 'end',
							columns : 2,
							vertical : true,
							items : [{
										xtype : 'datefield',
										name : 'enddate',
										id   : 'enddate',
										format: 'Y-m-d',
										value:'${startdate}'
									}, {
										xtype : 'timefield',
										name : 'endtime',
										id   : 'endtime',
										value:'00:00',
										format: 'H:i'
									}]
						}, {
							xtype : 'textarea',
							name : 'context',
							fieldLabel : '关键字',
							anchor : '100%'
						}]

			});

	var searchWindows = new Ext.Window({
				layout : 'border',
				width : 500,
				height : 230,
				title : "查找",
				modal : true,
				resizable : true,
				maximizable : true,
				iconCls : 'search',
				items : [Search],
				plain : true
			});

	searchWindows.addButton({
				text : "确定",
				handler : function() {
					var data = "{start_date:'" + Ext.get("start_date").getValue() + "',end_date:'" + Ext.get("end_date").getValue() + "',keyword:'" + Ext.get("keyword").getValue() + "'}";
					searchReturn(data);
					searchWindows.close();
				}
			});
	searchWindows.addButton({
				text : '取 消',
				handler : function() {
					searchWindows.close();
				}
			});
	searchWindows.show();
}

function ClearSysLog(){
		var Clear = new Ext.form.FormPanel({
				frame : true,
				layout : 'form',
				region : 'center',
				xtype : 'fieldset',
				bodyStyle : 'padding:10px;',
				items : [{
							xtype: 'checkboxgroup',
							itemCls: 'x-check-group-alt',
							fieldLabel: '日志类型',
							columns: 3,
							items: [
							{boxLabel: 'VPN日志', name: 'tips',id:'tips'},
							{boxLabel: '流量日志', name: 'terminal',id:'terminal'},
							{boxLabel: 'NAT日志', name: 'network',id:'network'},
							{boxLabel: '防火墙日志', name: 'device',id:'device'},
							{boxLabel: '系统日志', name: 'fileencrypt',id:'fileencrypt'}
							]
				}, {
							xtype : 'textarea',
							name : 'context',
							fieldLabel : '关键字',
							anchor : '100%'
						}]

			});

	var clearWindows = new Ext.Window({
				layout : 'border',
				width : 500,
				height : 230,
				title : "查找",
				modal : true,
				resizable : true,
				maximizable : true,
				iconCls : 'sys_log',
				items : [Clear],
				plain : true
			});

	clearWindows.addButton({
				text : "确定",
				handler : function() {
					
					clearWindows.close();
				}
			});
	clearWindows.addButton({
				text : '取 消',
				handler : function() {
					clearWindows.close();
				}
			});
	clearWindows.show();
}